-
Notifications
You must be signed in to change notification settings - Fork 135
fix(pb): implement events and commands for actor wfs #3543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 11-21-fix_make_all_uses_of_protocol_handle_v4_-_v3
Are you sure you want to change the base?
fix(pb): implement events and commands for actor wfs #3543
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
PR Review: Implement events and commands for actor workflowsI've reviewed this PR which implements MK2 protocol support for actor workflows. Here are my findings: Strengths
Issues & Concerns1. Channel abort TODO (actor_event_demuxer.rs:81) - HIGH PRIORITY 2. Metadata parsing (conn.rs:285-288, 299-303) - MEDIUM PRIORITY 3. Event deduplication (workflows/actor/mod.rs:466-477) 4. Runner state cleanup (workflows/actor/mod.rs:623-625) 5. Missing command ack tracking Security
Performance
Test CoverageConsider adding:
Recommendations
OverallSolid implementation with good architecture. Main concern is the task abort TODO. Recommendation: Approve with minor changes |
88e1336 to
52845b6
Compare
7ddbf54 to
72a5b39
Compare
52845b6 to
0d4625a
Compare
More templates
@rivetkit/cloudflare-workers
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |
Pull Request Review: fix(pb): implement events and commands for actor wfsOverviewThis PR implements events and commands handling for actor workflows in the Pegboard system, specifically adding support for the mk2 protocol version. The changes span across multiple packages including pegboard-runner, pegboard, pegboard-gateway, and related infrastructure. Code Quality & ArchitectureStrengths:
Potential Bugs & Issues
|
Performance Considerations
Security Concerns
Test CoverageMissing test scenarios:
Database Schema ConcernsCommand persistence: Commands are persisted but there is no cleanup logic. This could lead to unbounded growth over time. Add a cleanup mechanism for acknowledged/expired commands. |
Style & Convention Issues
RecommendationsHigh Priority:
Medium Priority:
Low Priority:
Overall AssessmentThis is a solid implementation that handles complex protocol versioning and event management. The code is generally well-structured with proper error handling. However, there are areas that need attention around data validation, performance at scale, and test coverage. The main concerns are unbounded growth (metadata size, command storage) and potential edge cases in event deduplication. Recommendation: Request changes to address high-priority issues, particularly around data validation and resource management. |
PR Review: Implement Events and Commands for Actor WorkflowsThis PR implements a significant refactoring of the actor lifecycle management system to use persistent events and commands for mk2 protocol runners. Here's my comprehensive review: ✅ Strengths
|
PR Review: fix(pb): implement events and commands for actor wfsI've completed a comprehensive review of this PR. This is a significant refactor implementing mk2 protocol support for actor workflows. Overall, the implementation is solid, but I've identified several areas that need attention. Critical Issues1. Missing Error Propagation (pegboard-gateway/src/lib.rs:210-213) 2. Unsafe unwrap_or_default() in Protocol Version (pegboard-gateway/src/lib.rs:172-173) 3. Race Condition in Init Handler (pegboard-runner/src/conn.rs:257-272) 4. Silent JSON Parse Failures (pegboard-runner/src/conn.rs:285-288, 299-303) High Priority Issues5. TODO Comments Need Resolution 6. Missing Tracing (pegboard/src/workflows/actor/runtime.rs:1096-1163) 7. HACK Comment (pegboard/src/workflows/actor/runtime.rs:573-574) Medium Priority Issues8. Unbounded Channels (pegboard-runner/src/actor_event_demuxer.rs:29) 9. Hardcoded EVENT_ACK_BATCH_SIZE 10. Incomplete Runner State Cleanup Positive Observations
Test CoverageMissing tests for:
SummaryOverall: Approve with Changes Priority actions before merge:
Follow-up issues to create:
Great work on this complex refactor! |
0d4625a to
b4edb53
Compare
Code Review: Events and Commands Implementation for Actor WorkflowsI've reviewed this PR which implements a significant architectural improvement to how actor workflows handle events and commands. Here's my detailed feedback: 🎯 Overall AssessmentThis is a well-structured PR that introduces important improvements to the actor workflow system, particularly around:
Overall Quality: Good ✅ 💡 Strengths
|
b4edb53 to
8d5a457
Compare
72a5b39 to
360920a
Compare
Code Review - PR #3543: fix(pb): implement events and commands for actor wfsOverviewThis PR implements a significant architectural improvement to the Pegboard actor system by introducing proper event and command handling for actor workflows, particularly for the mk2 runner protocol. The changes refactor how actors communicate with runners, moving from signal-based communication to a more robust event-driven model with persistent command storage. Summary of ChangesCore Changes:
Positive Aspects ✅
Issues & Concerns
|
PR Review: Implement Events and Commands for Actor WorkflowsThis PR implements a new event and command system for actor workflows in the pegboard system, adding support for the MK2 protocol version. Code Quality - Strengths:
Issues to Address:1. Critical: Missing Error Handling in conn.rs:288 2. Potential Race Condition in Event Processing 3. Database Transaction Complexity 4. Missing Bounds Check Performance Concerns:1. Command Storage Growth 2. Metadata Chunking 3. Event Demuxer Channels Security Concerns:1. Base64 Decoding Without Size Limit (actor/runtime.rs:579) 2. Metadata Injection (conn.rs:300-303) 3. Missing Input Validation Test Coverage:Missing tests for:
Recommendations Summary:Must Fix Before Merge:
Should Fix:
Nice to Have:
Conclusion:This is a substantial and well-structured change that adds important functionality and follows Rivet conventions. However, security and performance concerns around input validation and resource management should be addressed before merging. Overall Assessment: Approve with requested changes |
360920a to
7837fe9
Compare
8d5a457 to
02023f8
Compare

No description provided.